package io.renren.modules.generator.service.impl;

import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.generator.dao.MyResumeDao;
import io.renren.modules.generator.entity.MyResumeEntity;
import io.renren.modules.generator.service.MyResumeService;

import javax.annotation.Resource;


@Service("myResumeService")
public class MyResumeServiceImpl extends ServiceImpl<MyResumeDao, MyResumeEntity> implements MyResumeService {

    @Resource
    private MyResumeDao myResumeDao;

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<MyResumeEntity> page = this.page(
                new Query<MyResumeEntity>().getPage(params),
                new QueryWrapper<MyResumeEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public int updateResState(Long resId, Long hrId, Long myResState) {
        return myResumeDao.updateResState(resId,hrId,myResState);
    }

}